package com.alibaba.datax.plugin.reader.mongodbreader;

import com.alibaba.datax.common.spi.ErrorCode;

/**
 * Created by jianying.wcj on 2015/3/19 0019.
 */
public enum MongoDBReaderErrorCode implements ErrorCode {

    /***/
    ILLEGAL_VALUE("ILLEGAL_PARAMETER_VALUE","参数不合法"),
    ILLEGAL_ADDRESS("ILLEGAL_ADDRESS","不合法的Mongo地址"),
    DB_NAME_IS_NULL("DB_NAME_IS_NULL","dbName参数为空，请仔细填写后重试"),
    COLLECTION_NAME_IS_NULL("COLLECTION_NAME_IS_NULL","collectionName参数为空，请仔细填写后重试"),
    COLUMN_IS_NULL("COLUMN_IS_NULL","column参数为空，请仔细填写后重试"),
    ADDRESS_IS_NULL("ADDRESS_IS_NULL","address参数为空，请仔细填写后重试"),
    UNEXCEPT_EXCEPTION("UNEXCEPT_EXCEPTION","未知异常");

    private final String code;

    private final String description;

    private MongoDBReaderErrorCode(String code,String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }
}

